package cmo.neutech.day10.Level4Project9;

import java.util.Scanner;

class Gardener{
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        Fruit f1 = new Apple();
        Fruit f2 = new Oranges();
        Fruit f3 = new Pear();
        String x = sc.next();
        if(x.equals("苹果")){
            f1.createFruit();
        } else if (x.equals("桔子")) {
            f2.createFruit();
        } else if (x.equals("梨")) {
            f3.createFruit();
        } else {
            System.out.println("输入错误");
        }
    }
}
